]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/backgroundApps: Filter out unknown apps
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 5 Sep 2023 15:08:38 +0000 (17:08 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 5 Sep 2023 16:06:24 +0000 (16:06 +0000)
While extremely rare, flatpak apps are not guaranteed to provide
a .desktop file.

We don't have anything to represent the app in that case, but at
least we shouldn't break when trying to access properties on null,
so filter out these entries.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6913

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2938>

js/ui/status/backgroundApps.js

index d6f2e495b715c9c355bed7f89940a9f9d1215597..fb457ae2dced5df677668513d1fa60f49d5d890c 100644 (file)
@@ -226,6 +226,7 @@ class BackgroundAppsToggle extends QuickToggle {
 
                 return {app, message};
             })
+            .filter(item => !!item.app)
             .sort((a, b) => {
                 return a.app.get_name().localeCompare(b.app.get_name());
             })